Remove the superseded v5/v6/v7 search schema revisions - #3523
Remove the superseded v5/v6/v7 search schema revisions#3523jonathangreen wants to merge 2 commits into
Conversation
|
Claude finished @jonathangreen's task in 3m 29s —— View job Code Review
SummaryClean, mechanical removal. I verified there are no remaining Python references to DetailsMinor:
|
Greptile SummaryThis PR removes the now-superseded
Confidence Score: 5/5Safe to merge — this is a straightforward dead-code removal with no functional changes to production paths. All v5/v6/v7 references have been scrubbed from the codebase (confirmed via grep), v8 is self-contained and unchanged functionally, tests were ported correctly, and the mock backing document now matches the current production schema. Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| src/palace/manager/search/revision_directory.py | Drops v5/v6/v7 imports and narrows REVISIONS to [SearchV8()]; clean and correct. |
| src/palace/manager/search/v8.py | Docstring trimmed to remove references to the old inheritance chain; no functional changes. |
| tests/mocks/search.py | MockSearchSchemaRevisionLatest now backed by SearchV8().mapping_document() — correct for the current production schema. |
| tests/manager/search/test_search_v8.py | Removes v7-equivalence test (v7 deleted) and adds test_character_filters ported verbatim from the old TestSearchV5, now targeting SearchV8 — correct. |
| tests/manager/search/test_external_search.py | Drops the TestSearchV5 class and its v5/re imports; no remaining references to deleted modules. |
| src/palace/manager/search/revision.py | One-line docstring update: example index name updated from v5 to v8. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
RD["SearchRevisionDirectory\n(revision_directory.py)"]
V8["SearchV8\n(v8.py)"]
SR["SearchSchemaRevision\n(revision.py)"]
RD -->|"REVISIONS = [SearchV8()]"| V8
V8 -->|inherits| SR
subgraph deleted["Deleted (this PR)"]
V5["SearchV5 (v5.py)"]
V6["SearchV6 (v6.py)"]
V7["SearchV7 (v7.py)"]
V6 -->|"was: inherits"| V5
V7 -->|"was: inherits"| V6
end
subgraph mocks["Test Mocks"]
MSSL["MockSearchSchemaRevisionLatest"]
MSSL -->|"_document = SearchV8().mapping_document()"| V8
end
style deleted fill:#ffdddd,stroke:#cc0000,color:#333
Reviews (3): Last reviewed commit: "Trim stale revision-chain history from t..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3523 +/- ##
==========================================
- Coverage 93.52% 93.50% -0.02%
==========================================
Files 512 509 -3
Lines 46760 46663 -97
Branches 6379 6378 -1
==========================================
- Hits 43731 43633 -98
- Misses 1958 1959 +1
Partials 1071 1071 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I'm going to leave this in draft until its safe to merge, but its ready for a code review now, then it can just wait to get merged once approved. |
v8 is self-contained and is the only revision production creates indexes from, so the older chained revisions (v7 -> v6 -> v5) are no longer referenced and can be deleted. This removes their modules, drops them from the revision directory, and repoints the remaining test/mock usages at v8. The v8 module test absorbs the author char-filter test that previously lived against v5 in test_external_search, and drops its v7-equivalence test now that v7 is gone.
With v5/v6/v7 removed in this PR, the docstring no longer needs to recount the old inheritance chain to justify v8 being self-contained.
1558880 to
2b54d93
Compare
Description
Stacked on top of #3522 (
feature/search-v8). Removes the superseded v5/v6/v7 search schema revisions now that v8 is self-contained and is the only revision production creates indexes from.src/palace/manager/search/v5.py,v6.py, andv7.py, along with their dedicated tests (test_search_v6.py,test_search_v7.py).SearchRevisionDirectory, leavingREVISIONS = [SearchV8()].MockSearchSchemaRevisionLatestmapping document and aname_for_indexdocstring example.test_external_search.py) intoTestSearchV8, and drops v8's v7-equivalence test now that v7 no longer exists to compare against.Motivation and Context
#3522 made v8 self-contained specifically so that older revisions could be deleted once they fell out of use, instead of accumulating indefinitely behind the inheritance chain. This PR is that cleanup. Opening it now (in draft) keeps the follow-up visible so the removal isn't forgotten after the v8 release goes out.
How Has This Been Tested?
Ran the affected suites under the docker tox environment —
tests/manager/search/,tests/manager/scripts/test_initialization.py, andtests/manager/celery/tasks/test_search.py(the latter two exerciseMockSearchSchemaRevisionLatest, whose backing document now comes from v8). All 171 tests pass.mypyis clean on the changed source.Checklist